/**
 * 
 */
package br.com.buscapecas.formatter;

import java.util.Date;


/**
 * @created 18/05/2010 - 09:00:46
 * @author Maikon Rafael da Rocha
 *
 */
public class DateFormatter extends Formatter {

    /**
     * 
     * @param yyyyMM
     * @return
     * @created 18/05/2010 - 09:04:58
     * @author Maikon Rafael da Rocha
     */
    public static String formatDateSiglaMes(int yyyyMM) {
        try {
            Date data = sdfAnoMes.parse(String.valueOf(yyyyMM));
            return sdfSiglaMes.format(data);
        } catch (Exception e) {
            e.printStackTrace();
            return "";
        }
    }
    
    /**
     * 
     * @param yyyyMM
     * @return
     * @created 18/05/2010 - 09:08:01
     * @author Maikon Rafael da Rocha
     */
    public static String formatDateAno(int yyyyMM) {
        try {
            Date data = sdfAnoMes.parse(String.valueOf(yyyyMM));
            return sdfAno.format(data);
        } catch (Exception e) {
            e.printStackTrace();
            return "";
        }
    }
    
    /**
     * 
     * @param yyyyMM
     * @return
     * @created 18/05/2010 - 09:08:01
     * @author Maikon Rafael da Rocha
     */
    public static String formatDateMesAno(int yyyyMM) {
        try {
            Date data = sdfAnoMes.parse(String.valueOf(yyyyMM));
            return sdfMesAno.format(data);
        } catch (Exception e) {
            e.printStackTrace();
            return "";
        }
    }
    
    /**
     * 
     * @param date
     * @return
     * @created 18/05/2010 - 16:16:50
     * @author Maikon Rafael da Rocha
     */
    public static String formatDate(Date date) {
        try {
            return sdfDiaMesAno.format(date);
        } catch (Exception e) {
            e.printStackTrace();
            return "";
        }
    }
    
}
